<?

function iop () {
    echo 'xxx';
}

rename_function('iop', 'piop');
piop();
die('iop called');

// Default library directory with end slash!!!
$GLOBALS['libdir'] = 'lib/';
// Default config directory with end slash!!!
$GLOBALS['cfgdir'] = 'etc/';

error_reporting(E_ERROR);
//ini_set('display_errors', '1');

// processing `/init` directory
if (($incdir = opendir('init')) != false)
{
	while (false !== ($files[] = readdir($incdir))){}
}



sort($files, SORT_ASC);
foreach ($files as $file) {
	if (strpos($file, '.') == 0) {
		continue;
	}
//        echo $file.'<br/>';

	if (strstr($file, 'php')) 
	{
		if (class_exists('Log')) {
			if (Log::targeted()) Log::put('Including file: '.$file);
		}
		include ('inc/'.$file);
	}
}

Log::put('System halted.');

?>